package player.ui.dialog;

import java.awt.Component;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;

import javax.swing.JTable;

import player.ui.playlist.PlayListManage;


public class MyJTable extends JTable{
	private static final long serialVersionUID = 5525597424267181584L;
	Thread monThread;
	MyJTable table;


	public MyJTable() {
		init();
	}

	public MyJTable(PlayListManage model) {
		super(model);
	}

	void init(){
		table=this;

		this.addMouseListener(new MouseListener(){

			public void mouseClicked(MouseEvent e) {

			}

			public void mouseEntered(MouseEvent e) {

			}

			public void mouseExited(MouseEvent e) {
				//	table.gete

				Component cp=table.getComponentAt(e.getPoint());
				//	System.out.println("JKJKJ "+e.getModifiers()+" "+e.getModifiersEx()+" "+e.getWhen()+" \n"+cp);
				boolean b=false;
				if(cp!=null){
					if(!cp.getClass().equals(javax.swing.JLabel.class)){
						b=true;
					}
				}else{
					b=true;
				}
				if(b){
					table.editingStopped(null);

				}


			}

			public void mousePressed(MouseEvent e) {

			}

			public void mouseReleased(MouseEvent e) {

			}

		});
	}

}
